﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Radovici.Ctrls.ContentControls;

namespace RadoviciDemo
{
    public partial class Modality : UserControl
    {
        public Modality()
        {
            InitializeComponent();
        }

        private void OnButtonClick(object sender, RoutedEventArgs e)
        {
            var btn = sender as Button;
            if (btn != null)
            {
                var widget = new Widget
                {
                    Content = "Modal Widget",
                    Title = "Modal Widget Demo",
                    OkEnabled = true
                };                
                widget.Show(OnWidgetReturn, sender as UIElement);
            }
        }

        private void OnWidgetReturn(object ctrl, EventArgs e)
        {
            Console.WriteLine("OnWidgetReturn");
        }
    }
}
